#ifndef SETTINGS_H
#define SETTINGS_H
#include"opencv2\opencv.hpp"


struct CircleMapParams
{
	//two circle center
	cv::Point center1;
	cv::Point center2;

	//text pos
	cv::Point man_txt;
	cv::Point female_txt;
	cv::Point vip_txt;
	cv::Point no_vip_txt;

	//statics
	cv::Point num_in;
	cv::Point num_out;
	cv::Point num_vip;
	cv::Point num_non_vip;

	/*CircleMapParams(const cv::Point& center1_,const cv::Point& center2_,
		const cv::Point& man_txt_, const cv::Point& female_txt_, const cv::Point& vip_txt_, 
		const cv::Point& non_vip_txt_, const cv::Point& num_in_, const cv::Point& num_out_, const cv::Point& num_vip_) :
		center1(center1_),center2(center2_),man_txt(man_txt_),female_txt(female_txt_),vip_txt(vip_txt_),
		no_vip_txt(non_vip_txt_),num_in(num_in_),num_out(num_out_),num_vip(num_vip_)
	{

	}*/
};

struct Age
{
	int base_x;
	int base_y;
	int diff_x;

	/*Age(int x, int y, int diff_x_):base_x(x),base_y(y),diff_x(diff_x_){}*/
};

struct Hist
{
	cv::Rect draw_region;
	cv::Rect hist_region;
};

struct Person_in_out
{
	cv::Rect person_region;
	cv::Point id;
	cv::Point age;
	cv::Point gender;
	cv::Point time;
	cv::Point in;
	cv::Point out;
	int diff;
};

struct HorizontalSettins
{
	cv::Rect frame_region = cv::Rect(50, 50, 1120, 630);

	CircleMapParams m_circle_map = { cv::Point(1330, 405),cv::Point(1722, 405),cv::Point(1545, 355),cv::Point(1545, 393),
		cv::Point(1545, 428) ,cv::Point(1545, 464) , cv::Point(1458, 232),cv::Point(1800, 232),cv::Point(1458, 271), cv::Point(0,0) };

	Age m_age = { 1281,680,85 };

	Hist m_hist = { cv::Rect(1220, 757, 580, 235) ,cvRect(30, 25, 550, 180) };

	Person_in_out m_person_in_out = { cv::Rect(10, 10, 80, 115),cv::Point(107, 37),cv::Point(149, 68),cv::Point(149, 80),cv::Point(105, 120),
		cv::Point(155,707),cv::Point(155,877), 257 };
};

struct VerticalSettings
{
	cv::Rect frame_region = cv::Rect(50, 50, 550, 980);

	CircleMapParams m_circle_map = { cv::Point(740, 292),cv::Point(1120, 292),cv::Point(950, 244),cv::Point(950, 280),
		cv::Point(950, 315) ,cv::Point(950, 350) , cv::Point(824, 528),cv::Point(1094, 528),cv::Point(824, 613),cv::Point(1094,613) };

	Age m_age = { 1310,310,77 };

	Hist m_hist = { cv::Rect(1300, 395, 530, 235) ,cvRect(30, 25, 500, 180) };

	Person_in_out m_person_in_out = { cv::Rect(10, 10, 65, 115),cv::Point(90, 10),cv::Point(135, 54),cv::Point(135, 68),cv::Point(90, 115),
		cv::Point(720,707),cv::Point(720,877), 230 };
};

struct RenderSettings
{
	cv::Rect frame_region;

	CircleMapParams m_circle_map;

	Age m_age;

	Hist m_hist;

	Person_in_out m_person_in_out;

	RenderSettings(int mode)
	{
		if (mode == 0)
		{
			VerticalSettings hs;
			frame_region = hs.frame_region;
			m_circle_map = hs.m_circle_map;
			m_age = hs.m_age;
			m_hist = hs.m_hist;
			m_person_in_out = hs.m_person_in_out;
		}
		else
		{
			HorizontalSettins hs;
			frame_region = hs.frame_region;
			m_circle_map = hs.m_circle_map;
			m_age = hs.m_age;
			m_hist = hs.m_hist;
			m_person_in_out = hs.m_person_in_out;
		}
	}
};



#endif // !SETTINGS_H

